<!DOCTYPE HTML>
<html>

<head>

    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
    <meta name="description" content=""/>
    <meta name="author" content=""/>
    <title>Fobia - Bootstrap 4 Web Application UI Kit</title>
    <!--favicon-->
    <link rel="icon" href="assets/images/favicon.ico" type="image/x-icon">
    <!-- Bootstrap core CSS-->
    <link href="assets/css/bootstrap.min.css" rel="stylesheet"/>
    <!-- animate CSS-->
    <link href="assets/css/animate.css" rel="stylesheet" type="text/css"/>
    <!-- Icons CSS-->
    <link href="assets/css/icons.css" rel="stylesheet" type="text/css"/>
    <!-- Custom Style-->
    <link href="assets/css/app-style.css" rel="stylesheet"/>

</head>

<body class="bg-facebook">

<!-- start loader -->
<div id="pageloader-overlay" class="visible incoming">
    <div class="loader-wrapper-outer">
        <div class="loader-wrapper-inner">
            <div class="loader"></div>
        </div>
    </div>
</div>
<!-- end loader -->

<!-- Start wrapper-->
<div id="wrapper">

    <div class="card card-authentication1 mx-auto my-4">
        <div class="card-body">
            <div class="card-content p-2">
                <div class="text-center">
                    <img src="assets/images/logo-icon.png" alt="logo icon">
                </div>
                <div class="card-title text-uppercase text-center py-3">学生注册</div>
                <!--
                                 表单
                                  -->
                <form method="post" action="stusigup">

                    <div class="form-group">
                        <label for="账  号" class="sr-only">账 号</label>
                        <div class="position-relative has-icon-right">
                            <input type="text" id="exampleInputaccount" class="form-control input-shadow"
                                   placeholder="请输入你的账号" name="stno">
                            <div class="form-control-position">
                                <i class="icon-user"></i>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="姓  名" class="sr-only">姓 名</label>
                        <div class="position-relative has-icon-right">
                            <input type="text" id="exampleInputName" class="form-control input-shadow"
                                   placeholder="请输入你的姓名" name="sname">
                            <div class="form-control-position">
                                <i class="icon-envelope-open"></i>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="请输入密码" class="sr-only">请输入密码</label>
                        <div class="position-relative has-icon-right">
                            <input type="text" id="exampleInputPassword" class="form-control input-shadow"
                                   placeholder="请输入密码" name="spwd">
                            <div class="form-control-position">
                                <i class="icon-lock"></i>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="请输入手机号码" class="sr-only">请输入手机号码</label>
                        <div class="position-relative has-icon-right">
                            <input type="tel" maxlength="11" onkeyup="value=value.replace(/[^(\d)]/g,'')"
                                   class="form-control input-shadow" placeholder="请输入手机号码" name="tel">
                            <div class="form-control-position">
                                <i class="icon-phone icons"></i>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="请输入你的专业" class="sr-only">请输入你的专业</label>
                        <div class="position-relative has-icon-right">
                            <input type="text" class="form-control input-shadow" placeholder="请输入你的专业" name="major">
                            <div class="form-control-position">
                                <i class="icon-flag icons"></i>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="请输入你的班级" class="sr-only">请输入你的班级</label>
                        <div class="position-relative has-icon-right">
                            <input type="text" class="form-control input-shadow" placeholder="请输入你的班级" name="stuclass">
                            <div class="form-control-position">
                                <i class="icon-flag icons"></i>
                            </div>
                        </div>
                    </div>

                    <input type="submit" class="btn btn-primary btn-block waves-effect waves-light" value="注册"/>

                </form>
            </div>
        </div>
        <div class="card-footer text-center py-3">
            <p class="text-dark mb-0">已经有账号了?
                <a href="StuLogin.html"> 在这登录</a>
            </p>
        </div>
    </div>

    <!--Start Back To Top Button-->
    <a href="javaScript:void();" class="back-to-top"><i class="fa fa-angle-double-up"></i> </a>
    <!--End Back To Top Button-->

</div>
<!--wrapper-->

<!-- Bootstrap core JavaScript-->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/popper.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>

<!-- sidebar-menu js -->
<script src="assets/js/sidebar-menu.js"></script>

<!-- Custom scripts -->
<script src="assets/js/app-script.js"></script>

<script>
    //添加专业表
    $(function () {

        $.ajax({
            url: 'listcoursejson',
            dataType: 'json',
            type: "post",
            error: function () {
            },
            success: function (data) {
                var course = data["course"];
                console.log("course.length:" + course.length)
                for (var aa = 0; aa < course.length; aa++) {
                    var cid = course[aa]["cid"];
                    console.log("cid:" + cid)
                    var cname = course[aa]["cname"];
                    console.log("cname:" + cname)
                    document.getElementById("Cname").innerHTML +=
                        ' <option value = "' + cid + '">' + cname + '</option>/n';
                }
            }
        })
    })
</script>
</body>

</html>